Ext.define('MyApp.view.addresslist.AddressListForm', {
	extend: 'MyApp.view.ux.BaseWindow',
	alias: 'widget.addresslistform',
	initComponent: function(){
		Ext.apply(this, {
			title : '增加新联系人',
			items: [{
				xtype: 'baseform',
				items: [{
						name: 'name',
						emptyText : '输入联系人名称,不能为空',
						//regex : /[\u4e00-\u9fa5]/,    
						fieldLabel: '联系人名称'
					},{
						xtype: 'combobox',
						name: 'sex',
						store: states,
						valueField: 'value',
		                displayField: 'des',
		                forceSelection: true,
						fieldLabel: '性别'
					},{
						name: 'phoneNumber',
						regex :/1[3|5|7|8|][0-9]{9}/,
						regexText:"电话号码格式不对",       //
						fieldLabel: '电话号码'
					},{
						name: 'email',
						vtype: 'email' ,
						fieldLabel: '电子邮件'
					},{
						name: 'qqNumber',
						regex:/^\d{5,10}$/,
						regexText:"QQ号码格式不对",  
						fieldLabel: 'qq号码'
					},{
						xtype:'datefield',
						name: 'birthday',
						fieldLabel: '生日',
						format: 'Y-m-d'
					},{
						name: 'description',
						fieldLabel: '备注'
					}
				]
			}]
		});
		this.callParent(arguments);
	}
});
var states = Ext.create('Ext.data.Store', {
    fields: ['value', 'des'],
    data : [
        {"value":"男", "des":"男"},
        {"value":"女", "des":"女"}
    ]
});